import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();

        int totalLength = a + b + c;
        int[] t = new int[totalLength];
        int[] f = new int[totalLength];

        initializeTArray(t);
        initializeFArray(f);

        populateFArray(a, b, c, f);

        int maxIndex = findMaxIndex(f);
        System.out.println(t[maxIndex]-2);
    }

    private static void initializeTArray(int[] t) {
        for (int i = 0; i < t.length; i++) {
            t[i] = i + 3;
        }
    }

    private static void initializeFArray(int[] f) {
        Arrays.fill(f, 0);
    }

    private static void populateFArray(int a, int b, int c, int[] f) {
        for (int a1 = 1; a1 <= a; a1++) {
            for (int b1 = 1; b1 <= b; b1++) {
                for (int c1 = 1; c1 <= c; c1++) {
                    f[a1 + b1 + c1 - 3]++;
                }
            }
        }
    }

    private static int findMaxIndex(int[] f) {
        int max = 0;
        int maxIndex = 0;
        for (int i = 0; i < f.length; i++) {
            if (f[i] > max) {
                max = f[i];
                maxIndex = i;
            }
        }
        return maxIndex;
    }
}
